-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/update user api #97
base: master
Are you sure you want to change the base?
Conversation
why need to update user api here? |
return c.JSON(http.StatusInternalServerError, message.CreateErrorMessage("Error marshalling request body")) | ||
} | ||
|
||
resp, err := http.Post(os.Getenv("USER_SERVICE_URL") + "/users/" + strconv.FormatUint(uint64(authId), 10), "application/json", bytes.NewBuffer(requestBodyJSON)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be posting to the url, it should be forwarding.
@@ -26,7 +26,7 @@ func main() { | |||
e.POST("/users", handlers.CreateUser) | |||
e.GET("/users", handlers.GetUsers) | |||
e.GET("/users/:id", handlers.GetUser) | |||
e.PUT("/users/:id", handlers.UpdateUser) | |||
e.POST("/users/:authId", handlers.UpdateUser) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The id has to be removed as a whole, if cannot fix then never mind.
What type of PR is this? (check all applicable)
Summary of PR
Details
#10
[Optional] Screenshots, Recordings